/* 
 * File:   IntersectionResult.h
 * Author: brady
 *
 * Created on June 22, 2011, 5:06 PM
 */

#ifndef INTERSECTIONRESULT_H
#define	INTERSECTIONRESULT_H
#include <core/Vector3D.h>
#include <core/Ray.h>
#include <float.h>
class Shape;
using namespace std;
class IntersectionResult {
public:
    IntersectionResult();
    virtual ~IntersectionResult();
    Ray ray;
    double tVal;
    Shape* shape;
    Vector3D normal;
    Vector3D hitPoint;
    Vector3D textureCoords;
    void set(const IntersectionResult& ir)
    {
        this->hitPoint = ir.hitPoint;
        this->normal = ir.normal;
        this->ray = ir.ray;
        this->tVal = ir.tVal;
        this->shape = ir.shape;
        this->textureCoords = ir.textureCoords;
    }
    static bool compare(IntersectionResult lhs, IntersectionResult rhs){
        return (lhs.tVal < rhs.tVal);
    }
private:
};
#endif	/* INTERSECTIONRESULT_H */

